// pages/personal/contact/contact.js
var utils = require('../../../utils/util.js');
Page({

    /**
     * 页面的初始数据
     */
    data: {

    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        var that=this;
        that.system();
        that.categoryTap();
    },
    //常见问题列表
    categoryTap:function(e){
        var that = this;
        utils.http("/api/v1/common/custom_category", {}, function (res) {
            that.setData({
                cateList: res.datas
            })
        })
    },
    //基本数据
    system:function(e){
        var that=this;
        utils.http("/api/v1/common/system",{},function(res){
            that.setData({
                dataSys:res.datas
            })
        })
    },
    onserviceTap:function(e){
        wx.navigateTo({
            url: '../customerservice/customerservice?id=' + e.currentTarget.dataset.id,
        })
    },

   //客服电话
    onPhoneTap:function(e){
        var that=this;
        console.log()
        wx.makePhoneCall({
            phoneNumber: that.data.dataSys.kf_phone //仅为示例，并非真实的电话号码
        })
    }
})